package thread;


import java.util.concurrent.Callable;

/**
 * @author hubert
 * @date 2018/10/10
 * @description MyCallable
 */
public class MyCallable implements Callable {
	private String threadName;

	public MyCallable(String threadName) {
		this.threadName = threadName;
	}

	@Override
	public Boolean call() throws Exception {
		System.out.println(Thread.currentThread().getName()+","+threadName+ ":正在执行....");
		try {
			Thread.sleep(2000L);
			System.out.println(threadName+":线程结束");
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return true;
	}
}
